home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Netrunner 2004 October
/
NETRUNNER0410.ISO
/
regular
/
sleipnir165.exe
/
{app}
/
documents
/
L.eng
/
Script.txt
< prev
next >
Wrap
Text File
|
2004-06-20
|
18KB
|
762 lines
==============================================================================
Sleipnir API Reference
Copyright (C) 2002 by Yasuyuki Kashgiwagi.
All Rights Reserved.
==============================================================================
Script of Sleipnir It operates using Windows Scripting Host (WSH).
The scripts below {ini_dir}\scripts\ is read.
The folders named $*** does not read.
They are for saving the script for work, and the event script for output.
The check of the "Sleipnir option | Script | Enable scripting control of Sleipnir"
is confirmed using a script. This option is invalid by the default.
To the directory "sciprts" Existence of "template_vbs" or "template_js" copies
the contents at the time of new creation.
If the created script is registered as a tool from "tool | customize | tool",
it can be added to a page menu or a tool bar.
If it registers with an address bar extension menu by the
"application:wscript.exe {INI_DIR} scripts\script name", it can also be used
from an address bar extension menu.
To in addition, URL If it specifies like
http://www.sample-url.com/<script=test\xxx.vbs>, it is after page reading.
<ini_dir> \scripts\test\xxx.vbs is performed.
Only the time of extensions being .vbs, .js, and .wsf can perform. Using this
function should confirm the check of "Sleipnir option|script|Enable scripting
after pages are loaded". It is peculiar to a document in the script performed
after page reading as an argument. ID is passed.
==============================================================================
Property
==============================================================================
(R) : Read only. A setup of a value cannot be performed.
[string] AddressBarString The string of an Address bar is acquired / set up.
[string] SearchBarString The string of a Search Bar bar is acquired / set up.
[string] URL Active document URL is acquired / set up.
[long] ActiveIndex The tab position of an active document is acquired / set up.
[string] FavoriteFile A favorite file is acquired / set up.
[string] AppPath(R) The directory where Sleipnir.exe exists is returned.
[string] ScriptPath(R) A directory with the script read is returned.
[string] ResourcePath(R) The directory of a resource read is returned.
[string] UserPath(R) The directory of various setup to save is returned.
[string] UserAgent UserAgent is acquired / set up.
[long] Handle(R) The window handle of Sleipnir is returned.
[long] Result The result of Sleipnir API is returned.
[long] Version(R) The version of Sleipnir is returned.
// 1.30 or subsequent ones
[bool] ShiftDown(R) The state of the Shift key is returned.
[bool] CtrlDown(R) The state of the Ctrl key is returned.
[bool] AltDown(R) The state of the Alt key is returned.
[bool] OutputVisible The visible state of an output bar is acquired / set up.
[long] OutputCurSel The selection line of an output bar is acquired / set up.
[string] OutputScript The script file called when double-clicked for output is acquired / set up.
This script is as an argument. /output: Selection line It is passed.
==============================================================================
Method
==============================================================================
----------------
[long] GetCount
----------------
[Description]
Return The number of documents currently opened.
[Argument]
Nothing
[Return value]
The number of documents currently opened
--------------------------------
[long] GetDocumentID(long index)
--------------------------------
[Description]
Get ID peculiar to a document.
[Argument]
index: Tab position (0 - GetCount-1)
[Return value]
ID peculiar to a document
------------------------------------
[IDispatch] GetWindowObject(long id)
------------------------------------
[Description]
Get Window Object.
[Argument]
id: ID peculiar to a document
[Return value]
Windows Object IDispatch
--------------------------------------
[IDispatch] GetDocumentObject(long id)
--------------------------------------
[Description]
Get HTML Document Object
[Argument]
id: ID peculiar to a document
[Return value]
Document Object IDispatch
----------------------------------------
[IDispatch] GetWebBrowserObject(long id)
----------------------------------------
[Description]
Get WebBrowser Object
[Argument]
id: ID peculiar to a document
[Return value]
WebBrowser Object IDispatch
----------------------------------------------
[long] NewWindow(string strUrl, bool bActive)
----------------------------------------------
[Description]
Open new document.
[Argument]
strUrl: Document opened newly Url
bActive: The window opened newly made active
[Return value]
Opened ID peculiar to a document
----------------------
[void] Close(long id)
----------------------
[Description]
Close the appointed document.
[Argument]
id: ID peculiar to a document
[Return value]
Nothing
----------------------------------------
[void] Navigate(long id, string strUrl)
----------------------------------------
[Description]
Access arbitrary URL by the present document.
[Argument]
id: ID peculiar to a document
strUrl: Url to navigate
[Return value]
Nothing
------------------------
[long] GetIndex(long id)
------------------------
[Description]
Get a tab position from ID peculiar to a document.
[Argument]
id: ID peculiar to a document
[Return value]
Tab position
------------------------------------
[void] MessageBox(string strMessage)
------------------------------------
[Description]
Show the message box of Sleipnir
[Argument]
strMessage: The message to display
[Return value]
Nothing
------------------
[void] Beep(void)
------------------
[Description]
ü@Beep ë╣é≡û┬éτé╖üB
Sound beep
[Return value]
Nothing
----------------------
[BOOL] IsBusy(long id)
----------------------
[Description]
A document reads and it judges in inside.
[Argument]
id: ID peculiar to a document
[Return value]
In under reading, it is true.
----------------------------------------------------------------------------
[void] SetSecurity(long id, BOOL bJavaScript, BOOL bJava, BOOL bRunActiveX,
BOOL bDownloadActiveX, BOOL bPicture, BOOL bSound,
BOOL bVideo)
----------------------------------------------------------------------------
[Description]
Set up the security of a document.
[Argument]
id: ID peculiar to a document
Each value: Each security
----------------------------------------
[BOOL] IsJavaScriptEnabled(long id)
[BOOL] IsJavaEnabled(long id)
[BOOL] IsRunActiveXEnabled(long id)
[BOOL] IsDownloadActiveXEnabled(long id)
[BOOL] IsPictureEnabled(long id)
[BOOL] IsSoundEnabled(long id)
[BOOL] IsVideoEnabled(long id)
----------------------------------------
[Description]
Get the security of a document.
[Argument]
id: ID peculiar to a document
[Return value]
It is true if effective.
------------------------------
[BOOL] IsNavigateLock(long id)
------------------------------
[Description]
It acquires whether a Navigation Lock is effective.
[Argument]
id: ID peculiar to a document
[Return value]
It is true if effective.
----------------------------------------------
[void] SetNavigateLock(long id, BOOL bEnable)
----------------------------------------------
[Description]
Navigation Lock is confirmed/repealed.
[Argument]
id: ID peculiar to a document
bEnable: It will be true if it confirms.
[Return value]
Nothing
----------------------------------------
[BOOL] SaveFavorite(string strFileName)
----------------------------------------
[Description]
Save Favorite files.
[Argument]
strFileName: Save file name(it specifies with a full path)
[Return value]
It is true if it is a success.
----------------------
[void] SaveClosedURL()
----------------------
[Description]
Overwrite preservation of the page closed recently is carried out at a file.
[Argument]
Nothing
[Return value]
Nothing
------------------------------------------
[BOOL] Search(long id, string strKeyword)
------------------------------------------
[Description]
Find on this page
[Argument]
strKeyword: Keyword
[Return value]
false will be returned, if a keyword cannot be discovered or it returns to a top keyword.
------------------------------------------
[void] Hilight(long id, string strKeyword)
------------------------------------------
[Description]
Highlight SearchBar String
[Argument]
strKeyword: Keyword
[Return value]
Nothing
--------------------------------------------------------------------
[void] WriteProfileInt(string strSection, string strKey, long nData)
--------------------------------------------------------------------
[Description]
Wright long type data in <ini_dir>\script.ini.
[Argument]
strSection: Section
strKey: Key
nData: Data
[Return value]
Nothing
----------------------------------------------------------------------------
[void] WriteProfileString(string strSection, string strKey, string strData)
----------------------------------------------------------------------------
[Description]
Wright string type data in <ini_dir>\script.ini.
[Argument]
strSection: Section
strKey: Key
nData: Data
[Return value]
Nothing
----------------------------------------------------------------------
[long] GetProfileInt(string strSection, string strKey, long nDefault)
----------------------------------------------------------------------
[Description]
Read long type data in <ini_dir>\script.ini.
[Argument]
strSection: Section
strKey: Key
nDefault: The value returned when a key does not exist
[Return value]
Data
------------------------------------------------------------------------------
[string] GetProfileString(string strSection, string strKey, string strDefault)
------------------------------------------------------------------------------
[Description]
Read string type data in <ini_dir>\script.ini.
[Argument]
strSection: Section
strKey: Key
nDefault: The value returned when a key does not exist
[Return value]
Data
--------------------------------------------------------------------------
[void] WriteProfileIntCipher(string strSection, string strKey, long nData)
--------------------------------------------------------------------------
[Description]
Wright long type data enciphered in <ini_dir>\script.ini.
[Argument]
strSection: Section
strKey: Key
nData: Data
[Return value]
Nothing
------------------------------------------------------------------
[void] WriteProfileStringCipher(string strSection, string strKey,
string strData)
------------------------------------------------------------------
[Description]
Wright string type data enciphered in <ini_dir>\script.ini.
[Argument]
strSection: Section
strKey: Key
nData: Data
[Return value]
Nothing
----------------------------------------------------------------------------
[long] GetProfileIntCipher(string strSection, string strKey, long nDefault)
----------------------------------------------------------------------------
[Description]
Read long type data enciphered from <ini_dir>\script.ini.
[Argument]
strSection: Section
strKey: Key
nDefault: The value returned when a key does not exist
[Return value]
Data
------------------------------------------------------------------
[string] GetProfileStringCipher(string strSection, string strKey,
string strDefault)
------------------------------------------------------------------
[Description]
Read string type data enciphered from <ini_dir>\script.ini.
[Argument]
strSection: Section
strKey: Key
nDefault: The value returned when a key does not exist
[Return value]
Data
----------------------
[BOOL] IsRead(long id)
----------------------
[Description]
It judges whether the document is already browsed.
[Argument]
id: ID peculiar to a document
[Return value]
Already browsed,true
------------------------------------------------------
[string] InputBox(string strPrompt, string strDefault)
------------------------------------------------------
[Description]
Show dialog which inputs a string
[Argument]
strPrompt: prompt
strDefault: Default string
[Return value]
strDefault is returned if it is the string and Cancel which were edited if it was OK.
#1(OK) or 0(Cancel) are set as a Result property.
------------------------------------------
[void] SetAutoRefresh(long id, long nTime)
------------------------------------------
[Description]
Set Auto Refresh time.
[Argument]
id: ID peculiar to a document
nTime: Updating time (0 - 1000 second)
[Return value]
Nothing
------------------------------
[long] GetAutoRefresh(long id)
------------------------------
[Description]
Get Auto Refresh time.
[Argument]
id: ID peculiar to a document
[Return value]
Auto Refresh time (second)
------------------------
[long] OutputGetCount()
------------------------
[Description]
Get number of lines currently outputted to Output.
[Argument]
Nothing
[Return value]
Lines
----------------------------------
[void] OutputAddString(string str)
----------------------------------
[Description]
Add a string to Output.
[Argument]
str: The string to output
[Return value]
Nothing
----------------------------------------------
[void] OutputInsertString(long n, string str)
----------------------------------------------
[Description]
Insert a string in Output.
[Argument]
n: Insert position
str: The string to output
[Return value]
Nothing
--------------------
[void] OutputClear()
--------------------
[Description]
Clear Output.
[Argument]
Nothing
[Return value]
Nothing
--------------------------------
[string] OutputGetString(long n)
--------------------------------
[Description]
Get a string from Output.
[Argument]
n: The line to acquire
[Return value]
string
----------------------------------
[void] OutputDeleteString(long n)
----------------------------------
[Description]
Delete a line from Output.
[Argument]
n: Delete line number
[Return value]
Nothing
----------------------------------------------------------
string MaskedInputBox(string strPrompt, string strDefault)
----------------------------------------------------------
[Description]
Display the dialog which inputs the character sequence protected with the mask.
[Argument]
strPrompt: Prompt
strDefault: Default string
[Return value]
In OK, the edited string is returned and, in Cancel, strDefault is returned.
#1 (O.K.) or 0 (Cancel) are set as a Result property.
------------------------------------------------------------------------
[long] GetProfileIntEx(string strSection, string strKey, long nDefault,
string strFileName)
------------------------------------------------------------------------
[Description]
Read long type data from INI file specified by strFileName.
[Argument]
strSection: Section
strKey: key
nDefault: The value returned when a key does not exist
strFileName: The file name which reads a setup
[Return value]
Data
------------------------------------------------------------------
[string] GetProfileStringEx(string strSection, string strKey,
string strDefault, string strFileName)
------------------------------------------------------------------
[Description]
Read string type data from INI file specified by strFileName.
The string surrounded by "" may be returned in a part of files.
[Argument]
strSection: Section
strKey: key
strDefault: The value returned when a key does not exist
strFileName: The file name which reads a setup
[Return value]
Data
----------------------------------------------------------
[void] DeleteProfileKey(string strSection, string strKey)
----------------------------------------------------------
[Description]
Delete arbitrary keys from <ini_dir>\script.ini.
[Argument]
strSection: Section
strKey: Key
[Return value]
Nothing
------------------------------------------------------------
[long] MsgBox(string strPrompt, string strTitle, long lFlag)
------------------------------------------------------------
[Description]
Call WinAPI::MessageBox
[Argument]
strPrompt: The string displayed on a message box
strTitle: The title of a message box
lFlag: The same value as WinAPI::MessageBox.
[Return value]
The same return value as WinAPI::MessageBox
------------------------
[void] ReloadClosedURL()
------------------------
[Description]
Reload ClosedURL.ini.
[Argument]
Nothing
[Return value]
Nothing
--------------------------------------
[void] AddSearchBarHistory(string ss)
--------------------------------------
[Description]
Add an item to the history of Search Bar.When a string already exists, it moves to a head.
[Argument]
ss: The string to add
[Return value]
Nothing
------------------------------
[void] ExecCommand(long cmdID)
------------------------------
[Description]
Specify and perform the arbitrary menus of Sleipnir by cmdID.
cmdID is referred to from mouse gestures(Gesture.ini).
[Argument]
cmdID: CommandID
[Return value]
Nothing
==============================================================================